package com.dm.base.domain;

import com.dm.common.annotation.Excel;
import com.dm.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 任务对象 b_task
 *
 * @author dm
 * @date 2024-12-09
 */
public class BTask extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 任务id
     */
    private Long taskId;

    /**
     * 名称
     */
    @Excel(name = "名称")
    private String name;

    /**
     * 数据库id
     */
    @Excel(name = "数据库id")
    private Long dbId;

    /**
     * 来源表
     */
    @Excel(name = "来源表")
    private String fromTable;

    /**
     * 目标表
     */
    @Excel(name = "目标表")
    private String toTable;

    /**
     * 帐号状态（1未运行 2运行中 3完成）
     */
    @Excel(name = "帐号状态", readConverterExp = "1=未运行,2=运行中,3=完成")
    private String status;

    /**
     * 类型（1仅删除 2仅拷贝 3拷贝并删除）
     */
    @Excel(name = "类型", readConverterExp = "1=仅删除,2=仅拷贝,3=拷贝并删除")
    private String type;

    /**
     * 每次行数
     */
    @Excel(name = "每次行数")
    private Long num;

    /**
     * 全部执行次数
     */
    @Excel(name = "全部执行次数")
    private Long times;

    /**
     * 已执行次数
     */
    @Excel(name = "已执行次数")
    private Long doTimes;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setDbId(Long dbId) {
        this.dbId = dbId;
    }

    public Long getDbId() {
        return dbId;
    }

    public void setFromTable(String fromTable) {
        this.fromTable = fromTable;
    }

    public String getFromTable() {
        return fromTable;
    }

    public void setToTable(String toTable) {
        this.toTable = toTable;
    }

    public String getToTable() {
        return toTable;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setNum(Long num) {
        this.num = num;
    }

    public Long getNum() {
        return num;
    }

    public void setTimes(Long times) {
        this.times = times;
    }

    public Long getTimes() {
        return times;
    }

    public void setDoTimes(Long doTimes) {
        this.doTimes = doTimes;
    }

    public Long getDoTimes() {
        return doTimes;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("taskId", getTaskId())
                .append("name", getName())
                .append("dbId", getDbId())
                .append("fromTable", getFromTable())
                .append("toTable", getToTable())
                .append("status", getStatus())
                .append("type", getType())
                .append("num", getNum())
                .append("times", getTimes())
                .append("doTimes", getDoTimes())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
